#ifndef VON_NEUMAN_1_H
#define VON_NEUMAN_1_H

#include <vector>
#include "neighbourhoods.h"
#include "ca-pathfinding/grids/grid.h"

 namespace vnn
 {
    std::vector<Tile*> neighbours(Grid* g,int& i, int& j)
    {

        std::vector<Tile*> v;
        int width=g->width();
        int height=g->height();

        if(i>0)v.push_back(g->tiles[i-1][j]);//N
        else v.push_back(nb::notExistingTile);
        if(j<width-1)v.push_back(g->tiles[i][j+1]);//E
        else v.push_back(nb::notExistingTile);
        if(i<height-1)v.push_back(g->tiles[i+1][j]);//S
        else v.push_back(nb::notExistingTile);
        if(j>0)v.push_back(g->tiles[i,][j-1]);//W
        else v.push_back(nb::notExistingTile);
        return v;
    }
}
#endif // VON_NEUMAN_1_H
